package com.lingxu.module.result.controller;

import com.lingxu.base.common.api.vo.Result;
import com.lingxu.module.result.entity.ApprovalParams;
import com.lingxu.module.result.service.ResultFeedbackService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Title: ResultFeedbackController
 * @Package: com.lingxu.module.result
 * @Author: ysj闫世杰
 * @Email: 1105324813@qq.com
 * @Date: Created in 2023/12/7 9:15
 * @Description:  成效反馈
 * @Version: 1.0.0
 */
@RestController
@RequestMapping(value = "/result/feedBack")
public class ResultFeedbackController {

    @Autowired
    private ResultFeedbackService resultFeedbackService;

    /**
     * @Author ysj闫世杰
     * @Description 查询需要审批成效反馈记录的模型
     * @Date 2023/12/7 9:27
     * @Param: page
     * @Param: limit
     * @Param: status
     * @Param: keyWord
     * @return com.lingxu.base.common.api.vo.Result
     **/
    @RequestMapping(value = "/findModelFeedBackList")
    public Result findModelFeedBackList(Integer page,Integer limit,String status,String keyWord){
        return resultFeedbackService.findModelFeedBackList(page,limit,status,keyWord);
    }

    /**
     * @Author ysj闫世杰
     * @Description 查询待审批的成效反馈列表
     * @Date 2023/12/7 10:30
     * @Param: page
     * @Param: limit
     * @Param: status
     * @Param: modelId
     * @return com.lingxu.base.common.api.vo.Result
     **/
    @RequestMapping(value = "/findNeedApproval")
    public Result findNeedApproval(Integer page,Integer limit,String status,String modelId,String types){
        return resultFeedbackService.findNeedApproval(page,limit,status,modelId,types);
    }

    /**
     * @Author ysj闫世杰
     * @Description 查询文件列表
     * @Date 2023/12/7 11:37
     * @Param: id
     * @return com.lingxu.base.common.api.vo.Result
     **/
    @RequestMapping(value = "/findupLoadFileList")
    public Result findupLoadFileList(String id){
        return resultFeedbackService.findupLoadFileList(id);
    }

    /**
     * @Author ysj闫世杰
     * @Description 审批
     * @Date 2023/12/7 16:04
     * @Param: params
     * @return com.lingxu.base.common.api.vo.Result
     **/
    @RequestMapping(value = "/updateApproval")
    public Result updateApproval(@RequestBody ApprovalParams params){
        return resultFeedbackService.updateApproval(params);
    }
}
